package com.zhugy.comparecode.asm;

import com.zhugy.comparecode.BaseCodeLine;
import com.zhugy.comparecode.CodeLine;
import com.zhugy.comparecode.CompareResult;
import com.zhugy.comparecode.util.CommonUtils;

public class EquLine extends BaseCodeLine implements CodeLine {
	
	private String content;

	public EquLine(int index, String content) {
		this.index = index;
		this.content = content;
	}

	@Override
	public CompareResult compareTo(CodeLine l) {
		if (!(l instanceof EquLine)) {
			return CompareResult.fail("代码类型不一样");
		}
		return CommonUtils.compareContent(this.getContent(), ((EquLine) l).content);
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
